<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.List"%>
<%@ page import="com.manage.dictionary.DictionaryVo"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	int pageon = 0;
  	int total = 0;
  	int count = 0;
  	String dicType = "";
  	String dicName = "";
  	if(request.getAttribute("pageon")!=null){
  		pageon = (Integer)request.getAttribute("pageon");
  	}
  	if(request.getAttribute("total")!=null){
  		total = (Integer)request.getAttribute("total");
  	}
  	if(request.getAttribute("count")!=null){
  		count = (Integer)request.getAttribute("count");
  	}
  	if(request.getAttribute("dicType")!=null){
  		dicType = (String)request.getAttribute("dicType");
  	}
  	if(request.getAttribute("dicName")!=null){
  		dicName = (String)request.getAttribute("dicName");
  	}
  	if(total==0){
  		pageon=0;
  	}
  	List queryList = (List)request.getAttribute("list");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>信息维护</title>
<link href="<%=basePath%>/images/css.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<%=path%>/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
	var msg = "${requestScope.rMsg}";
	if(msg != ""){
		alert(msg);
	}
	
	function toAdd(){
		window.location.href="<%=basePath%>/manage/grouppriv/dicmanage/dicadd.jsp";
	}
</script>
</head>

<body class="bg_003">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="201" height="30" align="center" background="<%=basePath%>/images/016.jpg"><table width="75%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25"><img src="<%=path%>/images/1.png" width="16" height="16"></td>
        <td><strong>信息维护</strong></td>
      </tr>
    </table></td>
    <td align="right" background="<%=path%>/images/017.jpg" class="zi_006"></td>
    <td width="39"><img src="<%=path%>/images/018.jpg" width="39" height="30"></td>
  </tr>
</table>
<form action="<%=path%>/dic/find.action" name = "find" id = "find">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="1" bgcolor="#e1e1e2"></td>
        <td height="298" align="center">
	        <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#e1e1e1">
	          <tr>
		            <td width="85%" height="31" bgcolor="#f5f5f5" colspan="4">
		              信息类别：<select name="dicType" id="dicType">
		              <option value="">全部信息</option>
		              <option value="DIC_COMPANY" <%="DIC_COMPANY".equals(dicType)? "selected":""%>>所属企业</option>
		              <option value="DIC_SCHOOL" <%="DIC_SCHOOL".equals(dicType)? "selected":""%>>服务学校</option>
		              <option value="DIC_PROGRAM_TYPE" <%="DIC_PROGRAM_TYPE".equals(dicType)? "selected":""%>>求助列表</option>
		              <option value="DIC_MANAGLEVEL" <%="DIC_MANAGLEVEL".equals(dicType)? "selected":""%>>安全级别</option>
		              <option value="DIC_RELIGION" <%="DIC_RELIGION".equals(dicType)? "selected":""%>>政治面貌</option>
		              <option value="DIC_POSITION" <%="DIC_POSITION".equals(dicType)? "selected":""%>>职务</option>
		              <option value="DIC_COLOR" <%="DIC_COLOR".equals(dicType)? "selected":""%>>车色</option>
		              </select>&nbsp;&nbsp;&nbsp;&nbsp;
		              信息名称：<input type="text" name='dicName' id='dicName' value='<%=dicName %>'/>&nbsp;&nbsp;&nbsp;&nbsp;
		              <input type="submit" name="searchbutton" id="searchbutton" value=" 查 询 "/>
		              <input type="button" onclick="toAdd()" value=" 增 加 "/>
		            </td>
		          </tr>
	          <tr>
	            <th width="10%" height="31" bgcolor="#f5f5f5">
				序号
	            </th>
	            <th width="15%" height="31" bgcolor="#f5f5f5">
	              信息类别
	            </th>
	            <th width="15%" height="31" bgcolor="#f5f5f5">
	              信息名称
	            </th>	
	            <th width="10%" height="31" bgcolor="#f5f5f5">
	            操作
	            </th>
	          </tr>
	          <%
   				if(queryList!=null&&queryList.size()>0){
   					for(int i=0;i<queryList.size();i++){
   						DictionaryVo vo = (DictionaryVo)queryList.get(i);
   			%>
	          <tr>
	            <td width="10%" height="31"  bgcolor="#f5f5f5"><%=i+1 %></td>
	            <td width="15%" height="31"  bgcolor="#f5f5f5"><%=vo.getDictype() %></td>
	            <td width="15%" height="31"  bgcolor="#f5f5f5"><%=vo.getDicname() %></td>
	            <td  bgcolor="#f5f5f5"><label><a href="<%=path%>/dic/one.action?dictionaryVo.id=<%=vo.getId()%>" >修改信息</a></label></td>
	          </tr>
	          <%}} %>
	          <tr>
	          <td colspan="4" height="31" align="right" bgcolor="#f5f5f5">
					共<%=total %>页&nbsp;&nbsp;&nbsp;第<%=pageon %>页
					<%if(total>0){
						if(pageon != 1) { %>
							<a href="<%=path %>/dic/find.action?dictionaryVo.pageon=1&dicType=<%=dicType %>&dicName=<%=dicName %>">第一页</a> 
							<a href="<%=path %>/dic/find.action?dictionaryVo.pageon=<%=(pageon - 1) %>&dicType=<%=dicType %>&dicName=<%=dicName %>">上一页</a>
						<%} %>
						<%if(pageon != total) { %>
							<a href="<%=path %>/dic/find.action?dictionaryVo.pageon=<%=(pageon + 1) %>&dicType=<%=dicType %>&dicName=<%=dicName %>">下一页</a> 
							<a href="<%=path %>/dic/find.action?dictionaryVo.pageon=<%=total %>&dicType=<%=dicType %>&dicName=<%=dicName %>">最后一页</a>
						<%} 
					}%>
	          </td>
	        </tr>
	        </table>
        </td>
        <td width="1" bgcolor="#e1e1e2"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="5" height="5"><img src="<%=path%>/images/019.jpg" width="5" height="5"></td>
        <td width="100%" height="5" class="bg_002"></td>
        <td width="5" height="5"><img src="<%=path%>/images/020.jpg" width="5" height="5"></td>
      </tr>
    </table></td>
  </tr>
</table>

<table width="603" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="26">&nbsp;</td>
  </tr>
</table>
</form>
</body>

</html>